Skip to content

Opensearch query builder#12573

Open
fira wants to merge 18 commits into
cmss13-devs:masterfrom
fira:opensearch-query-builder
Open

Opensearch query builder#12573
fira wants to merge 18 commits into
cmss13-devs:masterfrom
fira:opensearch-query-builder

Conversation

@fira

@fira fira commented Jul 3, 2026

Copy link
Copy Markdown
Member

About the pull request

Adds an in-game REST API client to query logs for the current round from OpenSearch.

The UI is rather simple, but comes with a few noteworthy features:

  • Queries can be created with ckey straight from Player Panel
  • Queries can be used collaboratively, and linked in Asay like tickets with ~ tilde
  • Queries can be written in Lucene syntax, which enables Boosting and Fuzzy Search
  • Queries can be sorted by time as usual, but also by relevance using Results Score, letting you find the closest matches instead of the most recent ones
  • Results have JMP links to the location of the event if present, or you can click on the CKEY to open the relevant Player Panel
  • You can filter to only show logs relevant to proximity of a certain place

Explain why it's good for the game

Smoother flow for simple log queries, directly ingame.

With results score ranking it also becomes possible to just take a shotgun approach by throwing relevant words and letting OpenSearch find closest matches, rather than fiddling with filters for days.

Testing Photographs and Procedure

It needs the backend to work so you'll have to try it live

Player panel button. You can also use .opensearch verb or the one in Admin verbs.
image

Example query made by the PP
image

How an example query with range filtering ends up when opening it on Dashboards
image

Writing keywords and letting the backend do its search job also becomes an option to find important events, without needing to slowboat through the entire stream of time sorted logs:
image

Changelog

🆑
admin: Added OpenSearch Query Builder for in-game log searching
/:cl:

@github-project-automation github-project-automation Bot moved this to Awaiting Review in Review Backlog Jul 3, 2026
@cmss13-ci cmss13-ci Bot added UI deletes nanoui/html Admin Make things harder for admins size/XL Denotes a PR that changes 799-1999 lines, ignoring generated files. labels Jul 3, 2026
Comment thread code/datums/opensearch/opensearch_query.dm Outdated
Comment thread code/datums/opensearch/opensearch_query.dm Outdated
Comment thread code/modules/admin/player_panel/actions/general.dm
*/}
<Stack.Item grow />
<Stack.Item align="right">
<Box color="label">rewind:</Box>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a tooltip explaining what it does. See https://github.com/cmss13-devs/cmss13/blob/master/tgui/docs/component-reference.md#tooltip Also may look nicer capitalized to Rewind.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to but none of these elements accept a tooltip. Might need to put an info bubble next to it

@Drulikar Drulikar Jul 4, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the component Tooltip (never not available) is different than the property tooltip (if available).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to do this aswell

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up putting a disabled gray button because the TGUI docs encourage doing that rather than using deprecated Tooltip

Comment thread tgui/packages/tgui/interfaces/OpenSearchQuery.tsx Outdated
Comment thread tgui/packages/tgui/interfaces/OpenSearchQuery.tsx Outdated
Comment thread tgui/packages/tgui/interfaces/OpenSearchQuery.tsx Outdated
Comment thread tgui/packages/tgui/interfaces/OpenSearchQuery.tsx
Comment thread tgui/packages/tgui/interfaces/OpenSearchQuery.tsx
Comment thread tgui/packages/tgui/interfaces/OpenSearchQuery.tsx Outdated
@github-project-automation github-project-automation Bot moved this from Awaiting Review to Changes Requested in Review Backlog Jul 4, 2026
@Drulikar Drulikar marked this pull request as draft July 4, 2026 05:29
Comment thread code/datums/opensearch/opensearch_query.dm Outdated
@fira

fira commented Jul 4, 2026

Copy link
Copy Markdown
Member Author

Changed a lot to try to streamline and fix bugs. Got rid of a lot of backend handling for stuff that was halfbaked.

Still have to address the 2 comments from Drathek above

@neeshacark

Copy link
Copy Markdown
Contributor

i love u btw

@fira fira marked this pull request as ready for review July 5, 2026 04:49
@fira fira added the Testmerge Candidate we'll test this while you're asleep and the server has 10 players label Jul 5, 2026
@fira fira added the Needs Testing Need to test it on the guinea pigs (production server) label Jul 5, 2026
@cm13-github

cm13-github commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Test merge deployment history:

Test Merge Deployed @ 07/05/2026 06:16:15 +00:00:
Server Instance

CM13 Live

Revision

Origin: 584ce29
Pull Request: f5282ee
Server: 4f94099

Test Merge Updated @ 07/05/2026 12:55:23 +00:00:
Server Instance

CM13 Live

Revision

Origin: 584ce29
Pull Request: a65a140
Server: 5ebefe2

Test Merge Updated @ 07/05/2026 16:41:39 +00:00:
Server Instance

CM13 Live

Revision

Origin: 584ce29
Pull Request: a65a140
Server: 3a17141

Test Merge Updated @ 07/06/2026 06:28:52 +00:00:
Server Instance

CM13 Live

Revision

Origin: 584ce29
Pull Request: a65a140
Server: 8d3c922

Test Merge Updated @ 07/07/2026 01:35:04 +00:00:
Server Instance

CM13 Live

Revision

Origin: 584ce29
Pull Request: a65a140
Server: 21140e5

Test Merge Updated @ 07/07/2026 02:36:09 +00:00:
Server Instance

CM13 Live

Revision

Origin: 584ce29
Pull Request: a65a140
Server: 57b8713

Test Merge Updated @ 07/07/2026 06:31:51 +00:00:
Server Instance

CM13 Live

Revision

Origin: 584ce29
Pull Request: a65a140
Server: c190f7c

Test Merge Updated @ 07/07/2026 07:33:29 +00:00:
Server Instance

CM13 Live

Revision

Origin: 584ce29
Pull Request: a65a140
Server: f7e63eb

Test Merge Updated @ 07/07/2026 08:38:32 +00:00:
Server Instance

CM13 Live

Revision

Origin: 2644306
Pull Request: a65a140
Server: da3d2af691548fe6415cf145bc5740cfd704b499

Test Merge Updated @ 07/07/2026 14:40:57 +00:00:
Server Instance

CM13 Live

Revision

Origin: 2644306
Pull Request: a65a140
Server: 77ce48f

Test Merge Updated @ 07/08/2026 00:44:17 +00:00:
Server Instance

CM13 Live

Revision

Origin: e6156c0
Pull Request: a65a140
Server: aa4bf91ff03b5d2437aae3fca2e92a0c273b89e8

Test Merge Updated @ 07/08/2026 03:15:42 +00:00:
Server Instance

CM13 Live

Revision

Origin: b2f9af8
Pull Request: a65a140
Server: 91fdb7d516237f1882d76aa6260a1d0c4ce7ab56

Test Merge Updated @ 07/08/2026 04:16:39 +00:00:
Server Instance

CM13 Live

Revision

Origin: 728eca0
Pull Request: a65a140
Server: cd4162b056ee847f8145dbdc83cb5b523e8098c0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin Make things harder for admins Needs Testing Need to test it on the guinea pigs (production server) size/XL Denotes a PR that changes 799-1999 lines, ignoring generated files. Testmerge Candidate we'll test this while you're asleep and the server has 10 players UI deletes nanoui/html

Projects

Status: Changes Requested

Development

Successfully merging this pull request may close these issues.

4 participants